#!/bin/zsh -f




if [[ -z $1 ]]; then
  /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
else
  USERID=`/usr/bin/id -u $1`;
  if [[ -z $USERID ]]; then
    return -1;
  fi
  /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -switchToUserID $USERID
fi

